//
//  RMMAdressBackView.m
//  Romomo
//
//  Created by puman on 16/10/12.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMAdressBackView.h"

@implementation RMMAdressBackView
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
        
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, self.height - 230, kScreenWideth, 30)];
        view.backgroundColor = kWhiteColor;
        [self addSubview:view];
        NSArray *array = @[@"取消",@"完成"];
        for (int i = 0 ; i < 2; i++) {
            UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
            button.frame = CGRectMake((kScreenWideth - 60) * i, 0, 60, view.height);
            [button setTitle:array[i] forState:(UIControlStateNormal)];
            [button setTitleColor:RGBA(54, 122, 218, 1) forState:(UIControlStateNormal)];
            if (i == 0) {
               button.titleLabel.font =  kFont(16);
                _cancelBut = button;
            } else {
                button.titleLabel.font =  kBFont(16);
                _doneBut = button;
            }
            [view addSubview:button];
        }
        _pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, kScreenHeight - 200, kScreenWideth, 200)];
        _pickerView.backgroundColor = [UIColor redColor];
        [self addSubview:_pickerView];

    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
